package com.neusoft.yuejian_6.model;

import com.neusoft.yuejian_6.service.ActivityService;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by 爽 on 2017/10/9.
 */

public class ActivityModel {
    private Retrofit retrofit;
    public ActivityModel(){
        retrofit=new Retrofit.Builder()
                .baseUrl("http://10.0.2.2/neu1_yuejian/index.php/Api/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    public Call activitylist(){
        ActivityService activityService=retrofit.create(ActivityService.class);
        return  activityService.getAllActivities();

    }
    /*public Call getShopById(){
        ActivityService activityService=retrofit.create(ActivityService.class);
        return  activityService.getAllShops();

    }*/
    /*public Call getFoodByShop(int shop_id){
        FoodService siService = retrofit.create(FoodService.class);
        return siService.getFoodByShop(shop_id);
    }*/
}
